range: Fixes to the new trough rendering
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Nov 2015 03:24:20 +0000 (22:24 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Nov 2015 03:27:31 +0000 (22:27 -0500)
There was an errant y that caused some troughs to not be drawn.
And also set the state of the fill node.

gtk/gtkrange.c

index 247d3a82872b910732ff6bdd224d4969124bb805..c87ad179f230e5af5dd284c8cfc14596c1cb6e82 100644 (file)
@@ -1859,6 +1859,8 @@ update_trough_state (GtkRange *range)
   gtk_css_node_set_state (priv->trough_node, state);
   if (priv->highlight_node)
     gtk_css_node_set_state (priv->highlight_node, state);
+  if (priv->fill_node)
+    gtk_css_node_set_state (priv->fill_node, state);
 }
 
 static void
@@ -2030,7 +2032,7 @@ gtk_range_draw (GtkWidget *widget,
           gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
 
           x += margin.left;
-          y += y + margin.top;
+          y += margin.top;
           width -= margin.left + margin.right;
           height -= margin.top + margin.bottom;